<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="../../../common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>模板项目管理</title>
<jsp:include page="../../../common/head.jsp"></jsp:include>
		<script language="javaScript">	
	// 添加报表项目
	function ins_report_detail()
	{
		window.parent.frame_right.location.href="insDetailReportEngine.do?reportId=${reportId}";
	}
	// 复制报表项目
	function copy_report_detail()
	{
		var str = xjCommon.getValueStr("reportDetailId",",");
		if(str!="")
		{
			if(confirm("确认复制所选数据？"))
			{
				var a = ModalWindow("jump.do?path=saveCopyDetailReportEngine.do&reportIds="+str,640,480);
				if(a=="ok")
				{
					window.location.reload();
				}
			}
		}
		else
			alert("请选择要进行复制的报表项！");
	}
	//批量样式调整
	function update_report_detail_style()
	{
		var str = xjCommon.getValueStr("reportDetailId",",");
		if(str!="")
		{
			ModalWindow("jump.do?path=updateStyleDetailReportEngine.do&reportIds="+str,800,600);
		}
		else
			alert("请选择要进行调整的报表项！");
	}
	// 修改报表项目
	function upd_report_detail(idValue)
	{
		window.parent.frame_right.location.href="updDetailReportEngine.do?reportDetailId="+idValue;
	}
	// 查看报表项目
	function show_report_detail(idValue)
	{
		window.parent.frame_right.location.href="updDetailReportEngine.do?edit=false&reportDetailId="+idValue;
	}
	// 删除报表项目
	function del_report_detail(idValue)
	{
		if(confirm("确认删除？"))
		{
			var a = ModalWindow("jump.do?path=delDetailReportEngine.do&reportDetailId="+idValue,640,480);
			if(a=="ok")
			{
				window.location.reload();
			}
		}
	}

</script>
	</head>
	<body>
	<div id="body_div">
	<w:ShowTitle name="报表项目管理">
	<w:TitleButton funcName="添加" hideCondition="${param.edit eq 'false'}" onClickFunction="ins_report_detail()" urlImg="${ctx}/images/main/add.png"/>
	<w:TitleButton funcName="复制" hideCondition="${param.edit eq 'false'}" onClickFunction="copy_report_detail()" urlImg="${ctx}/images/main/update.png"/>
	<w:TitleButton funcName="样式调整" hideCondition="${param.edit eq 'false'}" onClickFunction="update_report_detail_style()" urlImg="${ctx}/images/main/update.png"/>
	</w:ShowTitle>
	<div id="body_content">
		<table width="100%" class="listTable">
			<tr>
				<td class="td_title" width="40">
					<span onclick="xjCommon.checkAll('reportDetailId');" >全选</span>
				</td>
				<td class="td_title">
					项目名称
				</td>
				<td class="td_title" width="70">
					数据类型
				</td>
				<td class="td_title" width="70">
					操作
				</td>
			</tr>
			<c:forEach items="${datalist}" var="obj">
				<tr>
					<td>
						<input type="checkbox" name="reportDetailId" value="${obj.reportDetailId}"/>
					</td>
					<td class="left_align">
						${obj.reportDetailOrder}-${obj.reportDetailName}
					</td>
					<td>
						${obj.dataType}
					</td>
					<td>
						<c:if test="${param.edit eq 'false'}">
							<a href="#" onclick="show_report_detail('${obj.reportDetailId}')">查看</a>
						</c:if>
						<c:if test="${param.edit ne 'false'}">
							<a href="#" onclick="upd_report_detail('${obj.reportDetailId}')">修改</a>
							<a href="#" onclick="del_report_detail('${obj.reportDetailId}')">删除</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>
	</div>
	</body>
</html>




